package com.ruoyi.common.domain.video;

import com.ruoyi.common.core.domain.BaseEntity;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

/**
 * 视频目录 video_dir
 * 
 * @author ruoyi
 */
public class VideoDir extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门ID */
    @Id
    @GeneratedValue(generator = "JDBC")
    private Long id;

    /** 父部门ID */
    private Long parentId;

    /** 名称 */
    private String name;

    /** 显示顺序 */
    private Integer orderNum;

    /** 部门状态:0正常,1停用 */
    private String status;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    @Transient
    private String parentName;
    
    /** 子部门 */
    private List<VideoDir> children = new ArrayList<>();

    public Long getParentId()
    {
        return parentId;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    @NotBlank(message = "名称不能为空")
    @Size(min = 0, max = 30, message = "名称长度不能超过30个字符")
    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @NotNull(message = "显示顺序不能为空")
    public Integer getOrderNum()
    {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum)
    {
        this.orderNum = orderNum;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public List<VideoDir> getChildren()
    {
        return children;
    }

    public void setChildren(List<VideoDir> children)
    {
        this.children = children;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public VideoDir() {
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }
}
